package com.zf.transaction;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;


// @EnableAspectJAutoProxy(exposeProxy = true)
@MapperScan("com.zf.transaction.mapper")
@SpringBootApplication
public class SpringTransactionApplication {

    public static void main(String[] args) {
        // 设置这个变量后，Cglib会把Cglib动态代理生成的类写入到“指定的目录/全类名目录”，不设置则不写入
        // System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY, System.getProperty("user.dir") + "\\cglib");

        //设置这个变量后，JDK会把jdk动态代理生成的类写入到“当前项目的根目录/全类名目录”，不设置则不写入(见 java.lang.reflect.ProxyGenerator#saveGeneratedFiles)
        // jdk <= 8
        // System.setProperty("sun.misc.ProxyGenerator.saveGeneratedFiles", "true");
        // jdk > 8
        // System.setProperty("jdk.proxy.ProxyGenerator.saveGeneratedFiles", "true");

        SpringApplication.run(SpringTransactionApplication.class, args);
    }

}
